What's the purpose of checkRes?

I'm looking through examples of OLE automation, and consistently see the oleGet function wrapped in the checkRes function.

I haven't been able to locate information on the purpose of the checkRes function. Since it's used everywhere, I assume that it does something important.

Can anyone enlighten me as to its purpose?
SystemAdmin - Wed Apr 29 05:30:52 EDT 2009

Re: What's the purpose of checkRes?
SystemAdmin - Wed Apr 29 05:50:45 EDT 2009

checkRes for "check response" - OLE functions return null if there were no problems and the error code as string if some error occurred. checkRes translates this response to boolean. You could as well write

if (oleGet(foo, bar,) != "")
{
// error
}

but the checkRes creates kind of centralized error handling for OLE functions.